import { request } from ".";
import type { RESPONSE } from "../types/base";
import type { Comment, CommentForm } from "../types/comment";

export const reqAddComment = (coment:CommentForm) => request.post<null, RESPONSE>('/api/comment', coment)

export const reqGetCommentByIdsByPage = (id:string, page:number, size:number) => request.get<null, RESPONSE<{
    total: number
    list: Comment[]
}>>('/api/comment/'+id, {
    params: {
        page,
        size
    }
})